<!--
 * @Author: 千锋爱佛僧
 * @公众号: 大前端私房菜
 * @Slogan: 千锋精品教程，好学得不像实力派！
-->
<template>
  <div>
    <el-upload
      class="avatar-uploader"
      :http-request="handleImport"
      :show-file-list="false"
    >
      <el-icon class="avatar-uploader-icon"><Plus /></el-icon>
      导入Excel
    </el-upload>
    <div ref="cont"></div>
  </div>
</template>

<script>
import { excelImport } from "@/utils/excel-sdk";

export default {
  methods: {
    handleImport(info) {
      console.log(info);
      excelImport(info.file, this.$refs.cont);
    },
  },
};
</script>

<style lang="scss" scoped></style>
